﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.Model.DTO
{
    public class ReceivingBillOrderDto
    {
        public int Id { get; set; }

        /// <summary>
        /// 收货库房
        /// </summary>
        public int Wid { get; set; } = 0;

        /// <summary>
        /// 供应商Id
        /// </summary>
        public int? Suppid { get; set; }

        /// <summary>
        /// 客户id
        /// </summary>
        public int? CustomerId { get; set; }

        /// <summary>
        /// 判断是否是砖头（西安）
        /// </summary>
        public int DictReceivingId { get; set; } = 0;

        public List<ReceivingBillOrderDetailDto> ReceivingBillOrderDetailDtos { get; set; }

        [SugarColumn(IsIgnore = true)]
        public int NowUserId { get; set; } = 0;

        [SugarColumn(IsIgnore = true)]
        public string NowUserRealName { get; set; }
    }

    public class ReceivingBillOrderDetailDto
    {
        /// <summary>
        /// 收货明细ID
        /// </summary>
        public int ReceivingBillDetailId { get; set; }
        /// <summary>
        /// 收获数量
        /// </summary>
        public decimal ReceivedQty { get; set; }

        public int? OwerId { get; set; }

        public int MaterialId { get; set; }

        public string MaterialName { get; set; }

        /// <summary>
        /// 批次
        /// </summary>
        public string MaterialBatchNo { get; set; }

        /// <summary>
        /// 蒙牛小批次号
        /// </summary>
        public string SmallBatchNo { get; set; }

        /// <summary>
        /// 托盘
        /// </summary>
        public string? PalletBarcode { get; set; }

        /// <summary>
        /// 生产日期
        /// </summary>
        public DateTime? ProductDate { get; set; }

        /// <summary>
        /// 每个托盘接头数量
        /// </summary>
        public string? BatchNoExplain { get; set; }
        /// <summary>
        /// 出厂日期
        /// </summary>
        public DateTime? OutFactoryDate { get; set; }
        /// <summary>
        /// 生产厂家
        /// </summary>
        public string ProduceFactory { get; set; }

        /// <summary>
        /// 有效期
        /// </summary>
        public DateTime? ExpireDate { get; set; }

        /// <summary>
        /// 接头托盘
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 满载率
        /// </summary>
        public int? LoadFactor { get; set; } = 0;
    }
}
